package com.meowcook.common;

import lombok.Getter;

/**
* Created with Intellij IDEA.
* Description:
* User: 28792
* Date: 2025-04-28
* Time: 13:21
*/

@Getter
public enum ResultCode {
    SUCCESS(0, "成功"),
    FAIL(1000,  "失败"),
    FAIL_USER_PARAM_USERNAME_NULL(1001, "用户名不能为空"),
    FAIL_USER_PARAM_USERNAME_INVALID(1002, "用户名格式不正确"),
    FAIL_USER_PARAM_PASSWORD_NULL(1003, "密码不能为空"),
    FAIL_USER_PARAM_PASSWORD_INVALID(1004, "密码格式不正确"),
    FAIL_USER_TWO_PWD_NOT_SAME(1005, "两次输入的密码不一致"),
    FAIL_USER_NOT_EXIST(1006, "用户不存在"),
    FAIL_USER_EXIST(1007, "用户已存在"),
    FAIL_USER_LOGIN(1008, "已有用户登录"),
    FAIL_USER_ERROR_LOGIN(1009, "用户名或密码错误"),
    FAIL_USER_NOT_LOGIN(1010, "用户未登录"),
    FAIL_USER_LOGIN_ELSEWHERE(1011, "用户已在别处登录"),
    FAIL_PARAM_TOO_LONG(1100, "填写字数过长"),
    FAIL_HEALTH_INFO_HEIGHT_INVALID(1101, "这般高的，怕不是天上神仙！？再好好量量。"),
    FAIL_HEALTH_INFO_WEIGHT_INVALID(1102, "本喵见识短，没见过这般重的！？再好好测测。"),
    FAIL_HEALTH_INFO_AGE_INVALID(1103, "这般年岁，岂不是成喵仙了！？如实说来！"),
    ERROR_SERVICE(500, "服务器内部错误"),
    ;
    // 状态码
    private final int code;

    //描述信息
    private final String message;


    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }


    @Override
    public String toString() {
        return "code: " + code + ", message: " + message;
    }
}
